<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath()%>/js/easyui/themes/metro/easyui.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/validate/validate.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/global.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/easyui/easyui.js"></script>
<script type="text/javascript">
	$(function() {
		$("#sform").validate({
			rules : {
				subNo : {
					required : true
				},
				subName : {
					required : true
				},
				subPwd : {
					required : true
				},
				subKey : {
					required : true
				},
				subMenu : {
					required : true
				},
				subState : {
					required : true
				},
				subDate : {
					required : true
				},
				subRemark : {
					required : false
				}
			},
			errorPlacement : function(error, element) {
				element.css("border-color", "#1c3e57");
			},
		});
	});
</script>
</head>
<body>
	<div class="easyui-panel" title="编辑面板" style="width: 100%;" data-options="fit:true">
		<form id="sform" action="subject_save.html" method="post" enctype="multipart/form-data">
			<table width="90%">
				<tr>
					<td height="30" align="right" width="200"><b></b></td>
					<td width="300"><b>内容</b></td>
					<td><b>说明</b></td>
				</tr>
				<tr>
					<td></td>
					<td colspan="2"><hr /></td>
				</tr>
				<tr>
					<td height="30" align="right">编号 :</td>
					<td><input type="text" placeholder="编号" name="subNo" id="subNo" value="<s:property value="subjectBean.subNo"/>" /></td>
					<td>创建商户时将自动创建一个管理员权限的子账户,编码规则为"商编+00",商户登录时只能使用子账户号</td>
				</tr>
				<tr>
					<td height="30" align="right">名称 :</td>
					<td><input type="text" placeholder="名称" name="subName" id="subName" value="<s:property value="subjectBean.subName"/>" /></td>
					<td>名称</td>
				</tr>
				<tr>
					<td height="30" align="right">登录口令 :</td>
					<td><input type="text" placeholder="登录口令" name="subPwd" id="subPwd" value="<s:property value="subjectBean.subPwd"/>" /></td>
					<td>登录口令</td>
				</tr>
				<tr>
					<td height="30" align="right">密钥 :</td>
					<td><input type="text" placeholder="密钥" name="subKey" id="subKey" value="<s:property value="subjectBean.subKey"/>" /></td>
					<td>每个子账户拥有不同的密钥</td>
				</tr>
				<tr>
					<td height="30" align="right">权限菜单 :</td>
					<td><input type="text" placeholder="权限菜单" name="subMenu" id="subMenu" value="<s:property value="subjectBean.subMenu"/>" /></td>
					<td>子账户的权限菜单</td>
				</tr>
				<tr>
					<td height="30" align="right" >状态 :</td>
					<td><s:radio id="subState" name="subState" list="#{'0':'无效','1':'有效'}" value="subjectBean.subState"></s:radio></td>
					<td>状态</td>
				</tr>
				<tr>
					<td height="30" align="right">日期 :</td>
					<td><input type="text" placeholder="日期" name="subDate" id="subDate" value="<s:if test="subjectBean.subDate!=null"><s:text name="global.format.date"><s:param value="subjectBean.subDate"/></s:text></s:if>" onclick="WdatePicker();" /></td>
					<td>日期</td>
				</tr>
				<tr>
					<td height="30" align="right">备注 :</td>
					<td><input type="text" placeholder="备注" name="subRemark" id="subRemark" value="<s:property value="subjectBean.subRemark"/>" /></td>
					<td>备注</td>
				</tr>


				<tr>
					<td></td>
					<td colspan="2"><hr /></td>
				</tr>

				<tr>
					<td height="30" align="right"></td>
					<td><input type="button" class="submit" value="提交单据" onclick="if($('#sform').valid()){$('#sform').submit();}" /> <input type="button" class="submit" value="返回上级" onclick="history.go(-1);" /></td>
					<td></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>

